#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSystemTrayIcon>

#include "TimeCounter.h"
#include "tomato.h"
#include "eyes.h"
#include "set.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

    QTimer *timer;

    TimeCounter time_count;

    // 计时

    unsigned int circle = 1;

    unsigned int MAX_Time = 1800;

    Tomato *tomato;
    Eyes *eyes;
    Set *setForm;

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    Ui::MainWindow *ui;

    QSystemTrayIcon *sysTrayIcon;

    void initSysTrayIcon();//初始化任务栏图标
    void setTopWindow();//设置置顶显示

    void closeEvent(QCloseEvent* event);



private slots:
    void count();
    void ShowEyesForm();
    void onSysTrayIconActived(QSystemTrayIcon::ActivationReason reason);
    void LCDChange();
    void on_Tomato_clicked();
    void on_SetButton_clicked();
};
#endif // MAINWINDOW_H
